package com.shinewind.pojo.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@ApiModel(description = "用于返回文章数据")
public class ArticleVo implements Serializable {
    @ApiModelProperty(value = "文章id")
    @JsonProperty("aId")
    private Integer aId;
    @ApiModelProperty(value = "标题")
    private String title;
    @ApiModelProperty(value = "内容")
    private String content;
    @ApiModelProperty(value = "关联模型名称")
    private String name;
    @ApiModelProperty(value = "关联模型图片地址")
    private String src;
    @ApiModelProperty(value = "文章观看次数")
    private Integer watch;
    @ApiModelProperty(value = "是否是模型")
    private String isModel;
    @ApiModelProperty(value = "文章发布时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date publishTime;
    @ApiModelProperty(value = "文章更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
}
